package org.springblade.modules.admin.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.admin.enums.MaintainPlanContentEnum;
import org.springblade.modules.admin.enums.MaintainPlanContentStatusEnum;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/8/10 13:52
 */
@Data
@ApiModel("作业记录listModel")
public class MaintainPlanContentWorkListVo {

	@ApiModelProperty("任务编码")
	private Long planId;

	@ApiModelProperty("任务编码")
	private String planNum;

	@ApiModelProperty("任务类型名称")
	private String planName;

	@ApiModelProperty("任务时间")
	private String planDate;

	@ApiModelProperty("任务类型状态")
	private Integer typeStatus;

	@ApiModelProperty("小区名称")
	private String buildingName;

	@ApiModelProperty("电梯地址")
	private String address;

	@ApiModelProperty("电梯地址")
	private String userName;

	@ApiModelProperty("签到时间")
	private String signTime;

	@ApiModelProperty("更新时间")
	private String updateTime;

	@ApiModelProperty("任务状态")
	private Integer status;

	@ApiModelProperty("任务状态名称")
	private String statusName;

	@ApiModelProperty("逾期天数")
	private Integer overdueDay;


	public void setTypeStatus(Integer typeStatus) {
		this.typeStatus = typeStatus;
		if(typeStatus.equals(MaintainPlanContentEnum.MAINTAIN_BY.getId())){
			this.planName = MaintainPlanContentEnum.MAINTAIN_BY.getName();
		}else if(typeStatus.equals(MaintainPlanContentEnum.MAINTAIN_KR.getId())){
			this.planName = MaintainPlanContentEnum.MAINTAIN_KR.getName();
		}else if(typeStatus.equals(MaintainPlanContentEnum.MAINTAIN_WX.getId())){
			this.planName = MaintainPlanContentEnum.MAINTAIN_WX.getName();
		}
	}
	public void setStatus(Integer status) {
		this.status = status;
		if(status.equals(MaintainPlanContentStatusEnum.DISABLE.getId())){
			this.statusName = MaintainPlanContentStatusEnum.DISABLE.getName();
		}else if(status.equals(MaintainPlanContentStatusEnum.BEGIN_PROCESSED.getId())){
			this.statusName = MaintainPlanContentStatusEnum.BEGIN_PROCESSED.getName();
		}else if(status.equals(MaintainPlanContentStatusEnum.DIS_SIGN.getId())){
			this.statusName = MaintainPlanContentStatusEnum.DIS_SIGN.getName();
		}else if(status.equals(MaintainPlanContentStatusEnum.FINISH.getId())){
			this.statusName = MaintainPlanContentStatusEnum.FINISH.getName();
		}
	}
}
